home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
013
/
pcopy4.arc
/
PCOPY.DOC
< prev
next >
Wrap
Text File
|
1986-08-19
|
29KB
|
752 lines
P M O V E / P C O P Y
by
Norm Patriquin
Version 4.0
August 1986
Copyright 1986 by Norm Patriquin
Table of Contents
What is PCOPY . . . . . . . . . . . . . . . . . . . . . . 1
What is PMOVE . . . . . . . . . . . . . . . . . . . . . . 1
About PCOPY . . . . . . . . . . . . . . . . . . . . . . . 2
Features . . . . . . . . . . . . . . . . . . . . . . . . 3
Command Mode Parameters . . . . . . . . . . . . . . . . . 5
Examples . . . . . . . . . . . . . . . . . . . . . . . . 11
Registering PCOPY . . . . . . . . . . . . . . . . . . . . 12
Registration Form . . . . . . . . . . . . . . . . . . . . 13
Problems and Maintenance. . . . . . . . . . . . . . . . . 14
Other Utilities . . . . . . . . . . . . . . . . . . . . . 16
Page 1
What is PCOPY
-------------
PCOPY is a DOS command utility used to copy files between disks
and directories on disks. In addition to just copying files,
PCOPY also allows selection criteria to be specified to better
qualify the files to be copied.
PCOPY provides a safer way to copy files than is provided by
the DOS COPY command. It warns you if a file is about to be
overlayed and lets you have complete control over the copy
operation.
What is PMOVE
-------------
PMOVE is a DOS command utility used to move files between
disks and directories on disks. PMOVE combines the functions
of DOS COPY and DELETE commands to make make moving files
very easy. In addition to just moving files, PMOVE also
allows selection criteria to be specified to better qualify
the files to be moved.
PMOVE automatically determines the environment the move is
requested for and then determines if the data must be moved
or if the file can be moved by renaming. Moving with rename
is allowed if the move is to another directory on the same
disk device. If a rename move can be done, it is much faster
than moving the data, it helps to keep from fragmenting disk
free space, and allows very large files to be moved between
directories when they could not normally be moved with DOS
COPY because of insufficient space.
In this implementation, PMOVE is implemented as a DOS batch
command file that uses PCOPY with the /X parameter. If you
register PCOPY and ask for the complete utility disk you
will have two separate programs, PMOVE and PCOPY. For the
remaining part of this documentation we will refer to the
program as PCOPY. Remember that the only difference between
PCOPY and PMOVE is that PMOVE removes the file from the
source location after it has been sucessfully copied to the
desired location.
Page 2
About PCOPY
-----------
PCOPY is developed to allow standard DOS wildcard pathnames
in the source file specifications, and standard pathnames
for the target directory specification. Wildcards are not
allowed for the target path specification.
PCOPY attempts to anticipate your needs and help you accomplish
your task. For instance, if PMOVE determines that the target
directory name does not exist, it will ask you if it is to be
created. If you respond <YES>, the directory will be created
for you. With the /SAve option, if you are about to overlay
another file with a duplicate name, you will be asked if the
older duplicate file is to be renamed with a version number.
PCOPY keeps you out of trouble. If it saves you from
overlaying a needed file just once it has paid for itself.
Think of all the times it might have saved you in the past.
I have tried to develop PCOPY with all the features normally
needed for this kind of utility. I hope you find what you
need and that the utility is of use to you.
For an immediate command summary, enter the PCOPY command without
any parameters. Help panels will be displayed.
Page 3
Features:
---------
** Copies files to and from any disk or directory.
** Allows you to save older versions of files with new
names before replacing them.
** Moves files by copying them or renaming them to the new
location.
** Deletes the original file if /X is specified.
** Creates target directorys if needed.
** Makes sure the DOS archive flag is set correctly for each
file as it is moved.
** Preserves the DOS date and time for each file moved.
** Allows user to pause processing at any time by pressing any
keyboard key. Once stopped, the program can be terminated
by pressing <ESCAPE>.
** Provides file selection and processing control options
to tailor the move process to your own needs.
** Allows commands to be tested so you may be sure
that commands are specified as you desire.
** Copy updated files to a special disk or directory.
** If there is not sufficient space on the current target
disk, PMOVE will allow you to place another disk in the
drive and continue processing. This allows you to easily
move groups of files larger than disk size to other
computers.
** Start with a specific file in a directory.
** End with a specific file in a directory.
** Process files based on the date stored in its directory
entry.
Page 4
** Warns you before overlaying a file unless specific
parameters indicating otherwise are specified.
** Checks target disk for available space before starting
to copy files. This prevents time from being wasted
when the copy will not be able to complete.
** Gives you constant status of the progress of the
command.
** Runs with windows or using standard DOS screen output.
Page 5
Command Mode Parameters
-----------------------
PCOPY allows several command parameter switches to be specified
to qualify the copy criteria. All these parameters are
optional. The PCOPY command is used like DOS COPY except for
these switches. The command format and switch parameters are
described below. A quick review of command parameters is always
available by entering the PCOPY command without any parameters.
COMMAND FORMAT:
PCOPY from_file_spec [to_file_spec] [ (/ switches) ]
[from} Enter the DOS file specification for the directory and
file names to be moved.
The filename portion of the file specification may
contain wildcard characters documented by DOS (* and
?).
[to] Enter the DOS file specification for the directory and
filename to be copied to. If the "to" specification
is not entered, files will be moved to the current
directory.
/A Archive - Selects only files that have been marked
updated by DOS. This flag is updated by DOS whenever
a files is processed with an intent to change or
create new data.
/B BACKUP - When specified, the DOS Archive (Update)
flag is reset after a file has been copied.
/C Copy only. Do not delete the file after it is copied.
Only to be used with the PMOVE program.
Page 6
/D:[(]xxx Date. Select files based on the relationship between
[)] their last update date and the date specified. This
[=] parameter includes a date or number of days value.
It may also contain a modifier that reverses or
modifies the use of the date specified.
When xxx contains a date the date is compared to the
last update date of the file. The last update date
of the file is the date contained in its directory
entry. The file is selected if the condition specified
by the condition modifier is met. The condition
modifier meanings are:
'(' = Select files whose date is older than the
date specified.
')' = Select files whose date is newer than the
date specified.
'=' = Select files whose date is equal to the date
specified.
If the condition modifier is not specified, ')' is
assumed.
Date values may be specified in any of the following
formats:
MM/DD/YY MM-DD-YY DDMMMYY
12/31/80 12-31-80 31DEC80
If xxx contains a numeric value, that positive number
is used to calculate a date value a number of days
prior to the current date. Then that date is used
as in the calculation above.
Example:
/D:(1JAN86 - Process files updated before 1JAN86
/D:)1JAN86 - Process files updated after 1JAN86
/D:=1JAN86 - Process files updated 1JAN86
/D:(5 - Process files modified prior to 5 days ago
/D:)5 - Process files modified within the last 5 days
/D:=5 - Process files modified 5 days ago
/D- Delete all files on target drive before starting copy.
Page 7
/DC Directory Copy - When specified, the file is copied
to a directory with the same name on the target disk
volume. Only use this parameter when copying data
to a new disk drive. See also the /S option.
This is useful for copying all files and directories
from one disk to another.
If the target directory does not exist it will
automatically be created.
/E Select and move only files that exist on both the "from"
and "to" directories. This causes all duplicate named
files to be replaced.
/F:file First. Indicates that processing is not to start until
the specified full filename is encountered in the
scan of the directory.
This parameter is most useful in restarting a
move or copy from a location where it had
previously left off.
/L:file Last. Indicates that processing is to stop after
the specified full filename is encountered in the
scan of the directory. The file specified will be
processed if it matches selection criteria.
/M Stop screen from scrolling from scrolling past the end
without user intervention (MORE).
/ME MErge -- Works like using /U and /X parameter to move
most current files from one directory into another.
In addition, it deletes all the files that are not
moved to the new location. This has the effect of
merging the most current files from two directories
into a single directory.
/N Only move files that do not already exist on the target
directory. (New files). If the file already exists,
no attempt will be made to move it and no warning
message will be printed.
Page 8
/NW No Windows - Do not use windows during processing.
All screen output will be done through standard DOS
facilities.
/O Omit files from processing. This option reverses the
purpose of the source filespec in the command. Instead
if selecting those files, all files except those
matching the filespec will be selected.
/P Pause before each file is moved and ask for approval
to process it.
/R Replace any duplicate files on the target disk or
directory regardless of their dates.
/RE REgister the program. Use this option to register
your copy of the utility. You will need to have
the registration number and code that is sent to
you when you ask to be registered.
Part of the registration screen also allows you
to permanently modify the windows option. If you
do not want windows during processing use this
option to change the windows program option. You
do not need to be registered to change this
information.
Page 9
/RO Read-Only. Normally processing skips files marked
with the DOS Read-Only attribute. Using /RO causes
Read-Only files to also be selected for processing.
/S System -- All directories will be searched for
files to be processed. Processing will begin at
the root directory of the source disk.
/SA SAve -- Instead of overlaying already esisting files
with duplicate names, before the new file is copied,
the file in the target directory is renamed with a
version. This insures that no data is possibly lost.
If the file has an extension name, the last two
characters of the extension are replaced with a number
from 01 to 99 depending on the next available
number. PCOPY determines the next available number
by looking in the directory for other files with
similar names.
This facility can be used to easily save versions of
a file in a directory.
/SF System Files. Normally processing skips files marked
with the DOS System attribute. Using /SF causes
System files to also be selected for processing.
/T Test the move process. Use this switch when you
would like to test the PMOVE command entered without
actually moving any files or creating any directories.
Messages will indicate what will happen if the command
is executed without the /T switch.
/U Only move files that do not exist on the target
directory or duplicate filenames that are newer than
their counterparts on the target directory or disk.
Use of this option results in the most current version
of each selected file being at the target location.
Page 10
/V Verify -- Use the DOS verify option while copying
data. This causes all data to be reread after it
is written to disk to insure it was written
properly.
/X Move the files. Delete them after the copy is
performed. If the move is to another directory on the
same disk the directory entry for the file is moved
without having to move the data. This provides for
the fastest move possible. Used for PCOPY only.
Page 11
Examples:
1. Copy all files in directory \GEN to directory \SAVE
PCOPY \GEN \SAVE
2. Copy all files in directory \GEN to directory \SAVE
PCOPY \GEN \SAVE /C
3. Copy all *.BAT files from current directory to \SAVE
PCOPY *.BAT \SAVE
or
PCOPY *.BAT \SAVE\*.*
4. Move all files in current directory to disk in drive A:
PMOVE *.* A:/X
5. Update directory PAY with more current files from drive A:.
Save any old versions under generated version name.
PCOPY A:*.* \PAY /R/SA
6. Search hard disk C: for any files ending with .WKS and move
all the files to a new directory named \WKSDIR.
PCOPY c:*.* c:\WKSDIR /X/S
7. Copy all the files on the hard disk to multiple floppy disks
to be mounted in drive A:.
PCOPY *.* a: /S
Page 12
Registering PCOPY
-----------------
PCOPY is distributed under the Shareware concept. This makes it
available for anyone to try without obligation. If you decide it
is useful and want to keep it, I ask that you register your use
of it. This will allow for continued support and maintenance of
the program and will help to encourage that more quality software
be made available through this channel. We require all
corporate and government users of this utility register their
copies.
To simply register the program, $15 is requested. If you would
like the newest program disk and a copy of the manual send
$30. If you would like to register all the Patriquin utilities,
and receive programs on disk and manuals, send $45.
Send registration requests to:
Norm Patriquin
P.O. Box 8308
San Bernardino, CA 92412
The registration charge is a one time fee that entitles you to
all future versions of the product. These may either be obtained
from normal Shareware sources or directly from me. Any
organization ordering more than 100 copies is also entitled to
telephone support and will be given the technical support number.
Following is a form that may be used to register PCOPY.
Page 13
PCOPY Registration
Version 3.0
Please Register PCOPY to the following person. We will use ____
copies of the program and have enclosed $____ for each copy to
be used.
**************************************************************
_____ Registration code and serial number............ $15.00
_____ Registration, program disk and manual.......... $30.00
_____ Registration of all Patriquin Utilities with
program disks and manuals................... $45.00
_____ Update of newest Patriquin Utility disk with
manual. ................................... $15.00
**************************************************************
Name: __________________________________________________
Company: _______________________________________________
Address: _______________________________________________
_______________________________________________
City: ______________________________ State: ___________
Zip: ______________________
I obtained my copy of PCOPY from: ____________________________
If BBS indicate name and number please._________________________
________________________________________________________________
Please register the software under the following name:
____________________________________________________
Send to:
Norm Patriquin
P.O. Box 8308
San Bernardino, CA 92412
Page 14
P C O P Y
Problems and Maintenance
------------------------
I welcome all comments or enhancement suggestions. Please
document each item clearly and provide printed examples if
possible. Please be sure to include this form with all requests,
it will help to make sure we can provide you with the best
possible service.
Name: __________________________________________________________
Company: _______________________________________________________
Address: _______________________________________________________
_______________________________________________________
City: __________________________________ State: _______________
Zip: ______________________________
Telephone: _______ / ________________________ (Home / Work)
Date: _________________________
Description of problem or enhancement:
________________________________________________________________
________________________________________________________________
________________________________________________________________
________________________________________________________________
Suggested solution:
________________________________________________________________
________________________________________________________________
Page 15
Program Maintenance:
Version 1.0
Simple file move/copy utility with /U /N and /R parameters.
Version 2.0 June 1986
Added ability to create directory and detect full disks.
Version 3.0 August 1986
-- Window operation added.
-- Improved help.
-- /B /DC /D- /E /RE /S /SA /SF /V
Version 4.0 August 18, 1986
/ME /SF /RO parameters added.
- Corrected problem with /DC parameter and directory
scanning.
Page 16
Other Utilities by Norm Patriquin
---------------------------------
Following is a description of PSEARCH, another utility
I make available to users.
PSEARCH version 2.0 by Norm Patriquin April 1986
----------------------------------------------------------------
How PSEARCH can save you time ---
PSEARCH is a file and text find utility for use on the IBM
personal computer. It is not only a good technicians tool, it
provides an easy to use, quick, way for users to locate files
when their name has been forgotten or misplaced. This document
describes how PSEARCH can benefit users with various different
needs.
Word Processing Users
---------------------
PSEARCH has the ability to locate a file by words in its
contents. This provides you with a facility to locate your word
processing files by keywords or other information. The following
command will print the names of all files that contain the name
"Jones":
PS *.*/t:jones
If you do not have keywords to search for, you can examine the
contents of files to locate a file needed. PSEARCH will scan the
files matching the wildcard specification and show you the first
words in the file. By looking at these words you will easily be
able to identify the contents of each one.
The next command will produce a report of the contents of all
files. Only one line of words from each file will be displayed.
This line usually will contain the title of the document or a
letter or memo heading that will identify the document.
PS *.*/s/d/p
Page 17
Spreadsheet Users
-----------------
How many times have you forgotten the name of a spreadsheet you
created or needed to locate a spreadsheet from another users
files. After awhile names are very poor identifiers for files.
PSEARCH can examine spreadsheet files and locate specific file
names based on keywords found in the spreadsheet file. The
following command will show the names of all spreadsheet files
that contain the word "budget". The example below refers to all
files with extension .WKS. This is for 123 spreadsheet files.
PS *.WKS/t:budget
If you do not have a keyword to look for, you can examine the
contents of worksheet files to determine what they are. PSEARCH
will look for the first text data in the spreadsheet file and
show you that information. Since the first text in the file is
usually title or the column header information, it is easy to
identify the contents of the file.
The following command example will cause PSEARCH to show the text
contents of all files that satisfy the wildcard filename
criteria. The /P (Pause) parameter will allow you to see more
than one line of text information of each file if desired. You
will be prompted after each line of text is shown.
PS *.WKS/f/s/p
Program Developers
------------------
PSEARCH's ability to scan for text in files can greatly reduce
the time developers use to locate specific parts of code or
references to field variables. PSEARCH can search for any
specific string, complete words, word prefixes, or word suffixes.
Once files are found, you can automatically build DOS commands to
be executed against them. PSEARCH's ability to locate complete
words is invaluable in finding references to short variable names
that are also likely to be found as parts of other words. This
makes it more powerful than most text search facilities found in
editors.
Page 18
General Disk File Maintenance
-----------------------------
In addition to PSEARCH's ability to search for text in files, it
also contains the most complete file find facility to be found.
PSEARCH can search across multiple directories, even multiple
disk drives, for file names. The search can be limited to
specified wildcard names and also be limited to the other
following criteria:
--- File Attribute UPDATED, READONLY, SYSTEM
--- FIles greater than nnn days old
--- Files less than nnn days old
In addition to searching for files recorded in DOS directories,
PSEARCH can also find filenames that are stored in archive files
created by the ARC utility by System Enhancement Associates.
This allows you to quickly locate files that have been archived.
In addition, through, PSEARCH's DOS command execution, you may
automatically cause PSEARCH to unarchive the file.
Since PSEARCH can execute any DOS command against files selected,
it can perform unlimited file maintenance activities. For
example, the following command causes PSEARCH to archive all
files with a .BAS extension that is also over 30 days old:
PS *.BAS/f/a/o:30/x:arc m BAS.ARC #